﻿<local:DocumentBase x:Class="WPFExcelReport.JLTVK02JP"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
        xmlns:wep="clr-namespace:WPFExcelReport"
       Height="700" Width="1024" 
       Background="White" 
         Loaded="Window_Loaded"
        Title="JLTVK02JP"  
     >
    <local:DocumentBase.Resources>
    </local:DocumentBase.Resources>
    <Grid DataContext="{Binding}" Width="1021">
        <Grid.RowDefinitions>
            <RowDefinition Height="100" />
            <RowDefinition Height="150*" />
            <RowDefinition Height="200*" />
            <RowDefinition Height="50*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="512*"></ColumnDefinition>
            <ColumnDefinition Width="463*"></ColumnDefinition>
            <ColumnDefinition Width="49*" />
        </Grid.ColumnDefinitions>        
        <StackPanel Grid.ColumnSpan="2" Orientation="Vertical" Margin="0,0,19,66">
            <WrapPanel Width="950">
                <Label Content="订单类型："    Width="87" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtPOSTYPE" Width="42" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="White" Panel.ZIndex="99"
                         Text="BU" KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="3" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="任务书编号："    Width="101" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtKRS" Width="39" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="Pink" Panel.ZIndex="1"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="2" FontSize="18" Foreground="#FF141111" Height="33" />
                <TextBox Name="txtLFD" Width="78" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="Pink" Panel.ZIndex="2"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="6" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="客户合同号："    Width="103" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtCUPO" Width="190" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="YellowGreen" Panel.ZIndex="3"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="15" FontSize="18" Foreground="#FF141111" Height="33" />
                
            </WrapPanel>
        </StackPanel>
        <StackPanel Margin="0,35,19,0" Grid.RowSpan="4" Grid.ColumnSpan="2">
            <WrapPanel Width="950">
                <Label Content="生产交期从" Height="26" HorizontalAlignment="Left" Margin="10,5,0,0" Name="label3" VerticalAlignment="Top" Width="87" FontSize="16" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,2,0,0" Name="FROM_DN_DATE" VerticalAlignment="Top" Panel.ZIndex="4"
                                    SelectedDateChanged ="FROM_DN_DATE_SelectedDateChanged" Width="113" />
                <Label Content="至" Height="28" HorizontalAlignment="Left" Margin="10,5,0,0" Name="label4" VerticalAlignment="Top" Width="19" FontSize="16" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,2,0,0" Name="END_DN_DATE" VerticalAlignment="Top" Panel.ZIndex="5"
                                    SelectedDateChanged ="END_DN_DATE_SelectedDateChanged" Width="112" />
                <Button Content="查询订单" Height="33" Margin="10,0,0,0"  Name="btnQuery" Width="64" Panel.ZIndex="6"
                        Click="btnQuery_Click"/>
                <Button Content="导出订单" Height="33" Margin="10,0,0,0"  Name="btnEXCEL" Width="65" Panel.ZIndex="7"
                        Click="btnEXCEL_Click"/>
            </WrapPanel>
            <WrapPanel Width="952">
                <fd:FilteringDataGrid CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True"
            IsFilteringCaseSensitive="False"
            AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  Width="950"
                  Height="530" FontSize="11"
                  EnableColumnVirtualization="True"  
                  ScrollViewer.HorizontalScrollBarVisibility="Auto"
                  ScrollViewer.VerticalScrollBarVisibility="Auto"
                  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                               ItemsSource="{Binding}" x:Name="MasterDg" 
                               Grid.ColumnSpan="2" Margin="0,5,0,0" Grid.RowSpan="3" Grid.Row="1">
<!--VKPLIEFTERM	VKPPOSTYP	ORDERNO	ITEM	VKPKDKOMM	VKPKOLL	VKPART	VKPFARBE	KDART	KDARTBEZ	KDARTCOLOR	
QTY	VKPMEEH	DELNOTE	ARTNAME	DESCR	VALIDWID	COMPOSITION	PRICS	VKPPREH	VKPWAEHRSL	VKPWUTERM		BRANDNAME		
                    PAYCU	VKPNEUDAT	SCHB	REFERENCES	VKPKKOLL	STRNAME	FINISHING	MQTY	MON	DA -->
                    <fd:FilteringDataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=VKPLIEFTERM}" Header="生产交期" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=VKPPOSTYP}" Header="单类型" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=ORDERNO}" Header="任务书号" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=ITEM}" Header="行号" Width="SizeToCells" MinWidth="20" />
                        <DataGridTextColumn Binding="{Binding Path=VKPKDKOMM}" Header="合同编号" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=VKPKOLL}" Header="系列" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=VKPART}" Header="品种" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=VKPFARBE}" Header="颜色" Width="SizeToCells" MinWidth="20" />
                        <DataGridTextColumn Binding="{Binding Path=KDART}" Header="客户品种" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=KDARTBEZ}" Header="客户品种描述" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=KDARTCOLOR}" Header="客户色号" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=QTY}" Header="订单数量" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=VKPMEEH}" Header="单位" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=DELNOTE}" Header="交货范围" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=ARTNAME}" Header="品名" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=DESCR}" Header="规格" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=VALIDWID}" Header="有效幅宽" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=STRNAME}" Header="组织" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=FINISHING}" Header="整理要求" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=COMPOSITION}" Header="成份" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=PRICS}" Header="单价" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=VKPPREH}" Header="单位" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=VKPWAEHRSL}" Header="货币" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=VKPWUTERM}" Header="客户交期" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=KUNDNA}" Header="品牌客户" Width="SizeToCells" MinWidth="50" MaxWidth="100" />
                        <DataGridTextColumn Binding="{Binding Path=PAYCU}" Header="付款客户" Width="SizeToCells" MinWidth="50" MaxWidth="100" />
                        <DataGridTextColumn Binding="{Binding Path=VKPNEUDAT}" Header="开单日期" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=SCHB}" Header="跟单员" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=REFERENCES}" Header="投料依据" Width="SizeToCells" MinWidth="50" MaxWidth="100"/>
                        <DataGridTextColumn Binding="{Binding Path=VKPKKOLL}" Header="脱单" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=MQTY}" Header="任务书每花米数" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=MON}" Header="月份" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=DA}" Header="旬" Width="SizeToCells" MinWidth="30" />

                    </fd:FilteringDataGrid.Columns>
                </fd:FilteringDataGrid  >
            </WrapPanel>
        </StackPanel>
    </Grid>
</local:DocumentBase>
